<div class="col-lg-6">
  <div class="page-header">
    <h4>工作分配</h4>
  </div>

  <div class="row alert alert-info">
    <div class="col-lg-4">
      <label>机构过滤：</label><input class="form-control" type="text" ng-model="search_text">
    </div>
    <div class="col-lg-4" ng-init="fabs = [1,2,3,5,8,13,21,34,55,89,144]; search_num = 5;">
      <label>显示数量：</label>
      <select class="form-control" ng-model="search_num" ng-options="m for m in fabs">
      </select>
    </div>
  </div>

  <hr>

  <div class="row">
    <div class="panel-body" ng-init="send('job.index', {}); send('organ.index', {}); send('user.index', {}); send('position.index', {});">
      <div ng-repeat="organ in refs.organ_index | filter:{'name':search_text} | limitTo:search_num ">
        <h4 class="text-info"><b>{{organ.name}}</b>
          <!-- <a ui-sref="setting.job.edit_organ({id: organ.id, name: organ.name, assign: organ.member})"><i class="suffix fa fa-edit fa-1x"></i></a> -->
        </h4>
        <table class="table">
          <tr ng-repeat="member in organ.member">
            <td style="width: 2%;"><i class="pull-right fa fa-male"></i></td>
            <td style="width: 10%;">{{refs.user_hash[member].name}}</td>
            <td>{{refs.user_hash[member].login}}</td>
            <td style="width: 48%;">
              <ul>
                <li ng-repeat="job in user_job(organ.dn, member)">{{refs.position_hash[job.subject].name}}</li>
              </ul>
            </td>
            <td style="width: 5%;">
              <a ui-sref="setting.job.edit_subject({organ: organ, jobs: user_job(organ.dn, member), assign: refs.user_hash[member]})"><i class="fa fa-edit"></i></a>
            </td>
          </tr>
        </table>
      </div>
    </div>
  </div>
</div>


<div class="col-lg-6">
  <div ui-view></div>
</div>
